1. Field
Cache coherency in a multi-processor system.
2. Description of Related Art
In a multi-processor system having multiple caches, each cache may have a copy of a piece of data stored in memory. Problems arise when multiple data copies in the caches are not coherent. Various techniques have been developed to ensure data coherency. For example, when the data in one cache is modified, other copies of the data are marked as invalid so that they will not be used.
A copy of data in the cache is often referred to as a cache line, a memory line, or a line. A snooping operation refers to the process in which an agent of a bus monitors the bus for memory transactions, e.g., a read/write operation to a main memory location which may also reside in a cache. The agent may record the states of the cache lines involved in the memory transactions in a directory. The state of the cache line may indicate whether the line has only one valid copy outside of the main memory, has multiple valid copies shared by multiple caches, or has been invalidated. A data entry in the directory is often indexed by its memory address (e.g., the address in the main memory). As the size of the directory is generally less than the size of the memory, the directory sometimes may run out of space to record the state of a line for new memory transactions.